﻿namespace Web.Control.WWW.Lesson
{
    using System;
    using System.Data;
    using System.Configuration;
    using System.Web;
    using System.Web.Security;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.Web.UI.WebControls.WebParts;
    using System.Web.UI.HtmlControls;
    using Model.WWW_User.Teach;
    using BLF.WWW_User.Teach;
    using Lx.Web.Common.ControlsUI;
    public class AddLesson : BaseControl
    {
        private string memberno = "";
        protected string cid;

        protected override void OnLoad(EventArgs e)
        {
            memberno = HttpContext.Current.User.Identity.Name;
            if (memberno == "")
            {
                Page.Response.Redirect("/user/login.htm?ReturnUrl=" + Page.Request.Url.AbsoluteUri.Split('?')[0]);
                return;
            }
            if (!string.IsNullOrEmpty(Request["cid"]))
            {
                cid = Request["cid"];
            }
            else
            {
                Response.End();
            }
            if (!Teach.ValiCLesson(cid, memberno))
            { Response.End(); }
            base.OnLoad(e);
        }
    }
}